package com.scetop.bank;

import java.util.ArrayList;
import java.util.Iterator;

public class Customer {
    private String firstName;

    private String lastName;

    private Account account;

    private ArrayList<Account> accounts;
    private SavingsAccount savingsAccount;
    private CheckingAccount checkingAccount;

    public Customer(String f,String l){
        firstName = f;
        lastName = l;

        accounts = new ArrayList<>();
    }
    public String getFirstName(){
        return firstName;
    }
    public String getLastName(){return lastName;
    }
    public Account getAccount(){
        return account;
    }

    public void setAccount(Account account){
        this.account = account;
    }
    public void addAccount(Account account) {
        accounts.add(account);
    }
    public Account getAccount(int index){
        return accounts.get(index);
    }

    public int getNumOfAcccounts(){
        return accounts.size();
    }
    public Iterator<Account> getAccounts(){
        return accounts.iterator();
    }
    public SavingsAccount getSavingsAccount() {
        return savingsAccount;
    }
    public void setSavingsAccount(SavingsAccount savingsAccount) {
        this.savingsAccount = savingsAccount;
    }

    public Account getCheckingAccount() {
        return checkingAccount;
    }
    public void setCheckingAccount(CheckingAccount checkingAccount){
        this.checkingAccount = checkingAccount;
    }
}

